Add depth to KML writer.
authorrobertl <robertl>
Tue, 2 Sep 2008 08:38:41 +0000 (08:38 +0000)
committerrobertl <robertl>
Tue, 2 Sep 2008 08:38:41 +0000 (08:38 +0000)
kml.c

diff --git a/kml.c b/kml.c
index 28b21074268b5cc86897d6f4f4314b00d2a7a627..286a61038403c63e295e6ea3fb45fbb9ea73d0d7 100644 (file)
--- a/kml.c
+++ b/kml.c
@@ -618,7 +618,13 @@ static void kml_output_description(const waypoint *pt)
        if (pt->altitude != unknown_alt) TD2("Altitude: %.3f %s", alt, alt_units);
        if (pt->heartrate) TD("Heart rate: %d", pt->heartrate);
        if (pt->cadence) TD("Cadence: %d", pt->cadence);
+       /* Which unit is this temp in? C? F? K? */
        if WAYPT_HAS(pt, temperature) TD("Temperature: %.1f", pt->temperature);
+       if WAYPT_HAS(pt, depth) {
+               char *depth_units;
+               double depth = fmt_distance(pt->depth, &depth_units);
+               TD2("Depth: %.1f %s", depth, depth_units);
+       }
        if WAYPT_HAS(pt, speed) {
                char *spd_units;
                double spd = fmt_speed(pt->speed, &spd_units);